#!/usr/bin/env node

const https = require('https');
log = console.log,
city = process.argv[2]||"石家庄",
//addr =' https://api.66mz8.com/api/weather.php?location='+city;

addr = 

http.get(addr , (res) => {
    //printf response start line
    //  //http/1.1 200 ok
        log(`HTTP/${res.httpVersion
          } ${res.statusCode} ${res.statusMessage}`);
            //printfresponse headers
              log(res.headers);
                res.pipe(process.stdout);
    
                  let data = '';
                    res.on('data',(chunck)=>{
                        data += chunck;
                          });
                            res.on('end',()=>{
                              log(data);
                                  });
                                  });
         })
         })
})
